package STUDENT.TRANDAODAIVI.OOPs.Baitap_In_Poly_Ab;
import java.util.Scanner;

abstract class ChuanISO{
	public abstract String DKBangTan(String obj);
	public abstract String DKTanSo(String obj);
}

class NhaMang extends ChuanISO{
	public String DKBangTan(String obj){
		return obj;
	}
	public String DKTanSo(String obj){
		return obj;
	}
}

public class BT4 {
public static void main(String[] args) {
	Scanner input=new Scanner(System.in);
	NhaMang name=new NhaMang();
	System.out.print("Nhap ten nha mang: ");
	String temp1=input.nextLine();
	System.out.print("Dang ki bang tan: ");
	String temp2=name.DKBangTan(input.nextLine());
	System.out.print("Dang ki tan so: ");
	String temp3=name.DKTanSo(input.nextLine());
	if((temp2.equals("CDMA")||temp2.equals("WCDMA")||temp2.equals("GSM"))&&(temp3.equals("900Mhz-902Mhz")||temp3.equals("903Mhz-905Mhz")||temp3.equals("906Mhz-908Mhz"))){
		System.out.println("-----Registration Information-----");
		System.out.println("Nha mang: "+temp1);
		System.out.println("Bang tan: "+temp2);
		System.out.println("Tan so  : "+temp3);
	}
	else
	{System.out.println("Failed Registration");}
}
}
